/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UtilidadesTenencias;

import bd_tenencias.Generos;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

/**
 *
 * @author Earving
 */
public class RendererGenerosPropietarios extends DefaultListCellRenderer
{
    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
    {
    super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    setText("");
    if(value instanceof Generos)
        {
            Generos g = (Generos) value;
            setText(g.getDescripcion());
        }
    return this;
}
}
